﻿@model SCMS.UI.Models.RequestReviewModel

<link href="@Url.Content("~/Content/themes/scms1/jquery-ui-1.8.20.scms1.css")" rel="stylesheet"/>
<script src="@Url.Content("~/Scripts/js/jquery-1.7.2.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery-ui-1.8.20.scms1.min.js")" type="text/javascript"></script>

<h3>Procurement Requests for Review</h3>
<table width="100%">
    <tr>
        <td width="100%" align="center">
            <b>Order Requests</b>
                <div id="orDiv">
                    <table align="center" cellpadding="2" border="1" style="border: 1px solid grey; border-collapse: collapse; font-size: 12px;">
                        <tr class="gridheader">
                            <td align="center">OR Number</td>
                            <td align="center">Issue Date</td>
                        </tr>
                        @foreach (var or in Model.OrderRequests)
                        { 
                            <tr class="gridodd">
                                <td>
                                    @Ajax.ActionLink(or.ORRefNo, "../RequestReview/", new { id = "LoadOrderRequest" }, new AjaxOptions
                                    {
                                        OnBegin = "ShowDialogue('Order Request: " + or.ORRefNo + "')",
                                        UpdateTargetId = "popup-page",
                                        LoadingElementId = "popup-loading",
                                        Url = Url.Action("../RequestReview/LoadOrderRequest/" + or.ORID),
                                        OnSuccess = "CenterPopup"
                                    }) 
                                </td>
                                <td>@Html.DisplayFor(o=>or.IssueDate)</td>
                            </tr>
                        }
                    </table>
                </div>            
        </td>
    </tr>
</table>